Skip to content

fix(dashboard): enqueue wu-styling on network admin dashboard for activity-stream widget#768

Merged
superdav42 merged 1 commit into
mainfrom
bugfix/dashboard-activity-stream-css
Apr 8, 2026
Merged

fix(dashboard): enqueue wu-styling on network admin dashboard for activity-stream widget#768
superdav42 merged 1 commit into
mainfrom
bugfix/dashboard-activity-stream-css

Conversation

@superdav42

@superdav42 superdav42 commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

The activity-stream dashboard widget wraps its output in <div class="wu-styling">, which requires framework.css (registered as the wu-styling handle). The network admin dashboard is not a wp-ultimo admin page, so enqueue_default_admin_styles() skips it — the stylesheet is never enqueued and the widget renders unstyled.

Fix

Add wp_enqueue_style('wu-styling') in Dashboard_Widgets::enqueue_scripts() before the existing script enqueues. The method already guards on $pagenow === 'index.php', so the enqueue only fires on the dashboard.

Files Changed

  • EDIT: inc/class-dashboard-widgets.php — add wp_enqueue_style('wu-styling') in enqueue_scripts()

Testing

PHPStan level 0: no errors on changed file.
Change is a single wp_enqueue_style() call in an already-guarded method — no logic changes.

Resolves #767


aidevops.sh v3.6.167 plugin for OpenCode v1.3.16 with claude-sonnet-4-6 spent 4m and 7,613 tokens on this as a headless worker.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed visual styling of the activity-stream widget on the admin dashboard by ensuring required stylesheets load properly before the widget renders.

@coderabbitai

coderabbitai Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 37c9dd36-82c7-48ba-aea8-0c5393777df9

📥 Commits

Reviewing files that changed from the base of the PR and between 37f5340 and 09cc78b.

📒 Files selected for processing (1)
  • inc/class-dashboard-widgets.php

📝 Walkthrough

Walkthrough

The pull request adds an explicit enqueue of the wu-styling stylesheet in Dashboard_Widgets::enqueue_scripts() for the network admin dashboard. This ensures the activity-stream widget's wrapper receives required framework.css styling that was previously unavailable.

Changes

Cohort / File(s) Summary
Stylesheet Enqueue
inc/class-dashboard-widgets.php
Added wp_enqueue_style('wu-styling') before existing script enqueues in enqueue_scripts() method to provide styling for the activity-stream dashboard widget on the network admin dashboard.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

A rabbit hops through the styling affair,
Enqueuing with care, everywhere, everywhere! 🎨
The widget now glows with framework's sweet grace,
No more unstyled clutter in that dashboard space! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enqueuing the wu-styling stylesheet on the network admin dashboard for the activity-stream widget to render with proper styling.
Linked Issues check ✅ Passed The pull request fulfills issue #767 by adding wp_enqueue_style('wu-styling') in Dashboard_Widgets::enqueue_scripts() to ensure the activity-stream widget is styled on the network admin dashboard.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving issue #767; only the necessary stylesheet enqueue call was added to the Dashboard_Widgets class with no extraneous modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/dashboard-activity-stream-css

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

…ivity-stream widget

The activity-stream widget wraps output in <div class="wu-styling">, which
requires framework.css (registered as 'wu-styling'). The network admin dashboard
is not a wp-ultimo page so enqueue_default_admin_styles() skips it — add an
explicit wp_enqueue_style('wu-styling') call in enqueue_scripts() which already
guards on $pagenow === 'index.php'.

Fixes #767
@superdav42 superdav42 force-pushed the bugfix/dashboard-activity-stream-css branch from 7d2306c to 09cc78b Compare April 8, 2026 21:06
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

Performance Test Results

Performance test results for a70f4a3 are in 🛎️!

Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown.

URL: /

Run DB Queries Memory Before Template Template WP Total LCP TTFB LCP - TTFB
0 40 37.76 MB 810.00 ms (-28.00 ms / -3% ) 168.00 ms (+9.50 ms / +6% ) 1034.50 ms 1968.00 ms 1878.35 ms 88.20 ms (-4.95 ms / -6% )
1 56 49.02 MB 891.50 ms (-54.00 ms / -6% ) 144.00 ms 1033.00 ms (-57.50 ms / -6% ) 2026.00 ms 1939.90 ms (-46.80 ms / -2% ) 81.10 ms (+1.90 ms / +2% )

@superdav42 superdav42 merged commit 3107c7c into main Apr 8, 2026
11 checks passed
superdav42 added a commit that referenced this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(dashboard): enqueue wu-styling on network admin dashboard for activity-stream widget

1 participant